
const path = '/apis/welcome' ;

const regexp = /^\/apis/;

console.log( regexp.test( path ) );

console.log( path.match( regexp ) );